function isAnagram(str1,str2){
    let arr1 = new Array(30);
    let arr2 = new Array(30);
    let len1 = str1.length,len2 = str2.length;
    if(len1!==len2){
        window.alert("单词长度不同，非变位词");
        return ;
    }
    for(let i = 0;i<26;++i) arr1[i] = arr2[i] = 0;
    for(let i = 0;i<len1;++i){
        arr1[str1.charCodeAt(i)-97]++;
        arr2[str2.charCodeAt(i)-97]++;
        console.log(str1.charCodeAt(i)-97);
    }
    for(let i = 0;i<26;++i){
        if(arr1[i]!==arr2[i]){
            window.alert("非变位词");
            return ;
        }
    }
    window.alert("是变位词");
}

function reset(id1,id2){
    document.getElementById(id1).value = "";
    document.getElementById(id2).value = "";
}